

package com.hazelcast.map.impl.mapstore.writebehind;

import java.io.Serial;
import java.util.EventObject;

/**
 * For internal usage only.
 *
 * @param <E>
 */
public final class StoreEvent<E> extends EventObject {

    @Serial
    private static final long serialVersionUID = -7071512331813330032L;

    /**
     * Constructs a prototypical Event.
     *
     * @param source The object on which the Event initially occurred.
     * @throws IllegalArgumentException if source is null.
     */
    private StoreEvent(E source) {
        super(source);
    }

    public static <E> StoreEvent<E> createStoreEvent(E source) {
        return new StoreEvent<>(source);
    }

    @Override
    public E getSource() {
        return (E) super.getSource();
    }
}
